package com.a.ims.service.impl;


import com.a.ims.entity.Adminlog;
import com.a.ims.mapper.AdminlogMapper;
import com.a.ims.mapper.CardmateMapper;
import com.a.ims.service.AdminlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminlogServicelmpl implements AdminlogService {

    private final AdminlogMapper adminlogMapper;

    @Autowired
    public AdminlogServicelmpl(AdminlogMapper adminlogMapper) {this.adminlogMapper = adminlogMapper;}


    @Override
    public List<Adminlog> getAdminlog() {
        return adminlogMapper.getAdminlog();
    }

    @Override
    public int log(String adminId, String log) {

        Adminlog adminlog = new Adminlog();
        adminlog.setAdminId(adminId);
        adminlog.setLogText(log);

        return adminlogMapper.log(adminlog);
    }
}
